
<div class="layui-form-item">
  <label class="layui-form-label">标题<span></span></label>
  <div class="layui-input-inline">
	<input type="text"  placeholder="" name="title" id="info_title" class="layui-input modelform_title" value="{$r?$r['title']:''}" style="" autocomplete="off">
  </div>
</div>	
<div class="layui-form-item">
  <label class="layui-form-label">缩略图<span></span></label>
  <div class="layui-input-inline file-upload">
		<input type="text" name="thumb" id="info_thumb" value="{$r?$r['thumb']:''}" autocomplete="off" class="layui-input"/>
		<div class="layui-btn-group">
			<button type="button" class="layui-btn" onclick="previewImg('info_thumb')"><i class="layui-icon">&#xe64a;</i>预览</button>
			<button type="button" class="layui-btn fastupimg" data-input_id="info_thumb" data-listtype="img" id="info_thumb_Picker"><i class="layui-icon">&#xe608;</i>上传</button>
			<button type="button" class="layui-btn" onClick="selectfile('info_thumb','','img')"><i class="layui-icon">&#xe67c;</i>浏览</button>
		</div>
  </div>
</div>	
<div class="layui-form-item">
  <label class="layui-form-label">时间<span></span></label>
  <div class="layui-input-inline">
	<input type="text"  placeholder="" autocomplete="off" name="newstime" id="info_newstime" value="<?=$r?date("Y-m-d H:i:s",$r['newstime']):date("Y-m-d H:i:s")?>" style=""  data-format="yyyy-MM-dd HH:mm:ss" class="layui-input form-date">
  </div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">多图<span></span></label>
    <div class="layui-input-inline morepic">
        <div class="morepic_box">
            <div class="piclist" data-field="morepic">
                <ul id="morepic_piclist_ul">
                    <?php
                    if($r){
                        $morepic=$r['morepic'];
                        $morepic_arr=explode("\r\n",$morepic);
                        foreach($morepic_arr as $v){
                            if(!$v){break;};
                            $vs=explode("||",$v);
                    ?>
                    <li title="拖动我是可以排序的哦" draggable="false">
                        <a class="piclist_img morepic_fancybox" rel="morepic_rel" title="<?=$vs[2]?>" href="<?=$vs[1]?>">
                            <img src="<?=$vs[0]?>" draggable="false">
                            <input type="hidden" name="morepic_smallimg[]" value="<?=$vs[0]?>">
                            <input type="hidden" name="morepic_bigimg[]" value="<?=$vs[1]?>">
                        </a>
                        <div class="piclist_title"><input type="text" name="morepic_imgname[]" value="<?=$vs[2]?>"></div>
                        <div class="file-panel"><span class="cancel" onclick="delete_li(this)" title="删除图片">删除</span></div>
                    </li>
                    <?php
                        }                     
                    }
                    ?>
                    <li class="add_morepic" id="morepic_add_button" title="增加图片" onclick="selectfiles('morepic',moreimg,'img','1600','')">
                        <div class="piclist_img">+</div>
                    </li>                                                
                    <div class="clear"></div>
                </ul>
            </div>                                        
        </div>
    </div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">多值<span></span></label>
    <div class="layui-input-inline morevalue">
		<script>
			var duozhi_form_js='<tr><td class="morevalue_image"><input value="" id="randImgId" name="duozhi_0[]"><a class="layui-btn layui-btn-sm" onClick="selectfile(\'randImgId\',\'\',\'img\',\'\',\'\')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm" onClick="morevaluePreImg(\'randImgId\')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_file"><input value="" id="randFileId" name="duozhi_1[]"><a class="layui-btn layui-btn-sm" onClick="selectfile(\'randFileId\',\'\',\'file\',\'\',\'\')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm" onClick="morevaluePreFile(\'randFileId\')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_video"><input class="layui-input" value="" id="randVideoId" name="duozhi_2[]"><a class="layui-btn layui-btn-sm" onClick="selectfile(\'randVideoId\',\'\',\'video\',\'\',\'\')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm" onClick="morevaluePreVideo(\'randVideoId\')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_textarea"><textarea class="layui-input" name="duozhi_3[]"></textarea></td><td class="morevalue_button"><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_add(this,duozhi_form_js)"><i class="layui-icon">&#xe654;</i></a><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_del(this)"><i class="layui-icon">&#xe640;</i></a></td></tr>';
		</script>
		<table class="layui-table" style="border-right:1px solid #ccc">
			<thead><tr><th style="width:20%">小图<input type="hidden" name="duozhi_morevalue_len[]" placeholder="我只是用于在保存信息的时候用来判断一共有几个morevalue字段的"></th><th style="width:20%">文件<input type="hidden" name="duozhi_morevalue_len[]" placeholder="我只是用于在保存信息的时候用来判断一共有几个morevalue字段的"></th><th style="width:20%">视频<input type="hidden" name="duozhi_morevalue_len[]" placeholder="我只是用于在保存信息的时候用来判断一共有几个morevalue字段的"></th><th style="width:20%">描述<input type="hidden" name="duozhi_morevalue_len[]" placeholder="我只是用于在保存信息的时候用来判断一共有几个morevalue字段的"></th><th style="width:10%">操作</th></tr></thead>
			<tbody>
				<?php
				if($r['duozhi']){
					$morevalue=$r['duozhi'];
					$morevalue_arr=explode("{{RsSplit}}",$morevalue);
					foreach($morevalue_arr as $k=> $v){
						if(!$v){break;}
						$vs=explode("{{FieldSplit}}",$v);
				?>				
				<tr><td class="morevalue_image"><input value="<?=$r?$vs['0']:''?>" id="duozhi_0_<?=$k?>" name="duozhi_0[]"><a class="layui-btn layui-btn-sm"  onClick="selectfile('duozhi_0_<?=$k?>','','img','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreImg('duozhi_0_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_file"><input value="<?=$r?$vs['1']:''?>" id="duozhi_1_<?=$k?>" name="duozhi_1[]"><a class="layui-btn layui-btn-sm" onClick="selectfile('duozhi_1_<?=$k?>','','file','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreFile('duozhi_1_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_video"><input class="layui-input" value="<?=$r?$vs['2']:''?>" id="duozhi_2_<?=$k?>" name="duozhi_2[]"><a class="layui-btn layui-btn-sm" onClick="selectfile('duozhi_2_<?=$k?>','','video','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreVideo('duozhi_2_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_textarea"><textarea class="layui-input" onclick="moreBigTextarea(this)" name="duozhi_3[]"><?=$r?$vs['3']:''?></textarea></td><td class="morevalue_button"><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_add(this,duozhi_form_js)"><i class="layui-icon">&#xe654;</i></a><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_del(this)"><i class="layui-icon">&#xe640;</i></a></td></tr>
				<?php
					}                     
				}else{
				?>
                                <tr><td class="morevalue_image"><input value="<?=$r?$vs['0']:''?>" id="duozhi_0_<?=$k?>" name="duozhi_0[]"><a class="layui-btn layui-btn-sm"  onClick="selectfile('duozhi_0_<?=$k?>','','img','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreImg('duozhi_0_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_file"><input value="<?=$r?$vs['1']:''?>" id="duozhi_1_<?=$k?>" name="duozhi_1[]"><a class="layui-btn layui-btn-sm" onClick="selectfile('duozhi_1_<?=$k?>','','file','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreFile('duozhi_1_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_video"><input class="layui-input" value="<?=$r?$vs['2']:''?>" id="duozhi_2_<?=$k?>" name="duozhi_2[]"><a class="layui-btn layui-btn-sm" onClick="selectfile('duozhi_2_<?=$k?>','','video','','')"><i class="layui-icon">&#xe681;</i></a><a class="layui-btn layui-btn-sm"  onClick="morevaluePreVideo('duozhi_2_<?=$k?>')"><i class="layui-icon">&#xe615;</i></a></td><td class="morevalue_textarea"><textarea class="layui-input" onclick="moreBigTextarea(this)" name="duozhi_3[]"><?=$r?$vs['3']:''?></textarea></td><td class="morevalue_button"><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_add(this,duozhi_form_js)"><i class="layui-icon">&#xe654;</i></a><a class="layui-btn layui-btn-primary layui-btn-sm" onclick="morevalue_del(this)"><i class="layui-icon">&#xe640;</i></a></td></tr>
				<?php
				}
				?>									
			</tbody>
		</table>
    </div>
</div>